home *** CD-ROM | disk | FTP | other *** search
- public class DisciplineTrueSight extends Discipline {
- private static final String DISCIPLINE_NAME = "TrueSight";
-
- public int cast(int level, int casterGuid) {
- if (!((Discipline)this).CheckCastParameters(level, casterGuid, "TrueSight")) {
- return 0;
- } else if (((Discipline)this).Fizzled(level)) {
- ((Discipline)this).DisplayFizzle("TrueSight", level);
- return 0;
- } else {
- try {
- int effectGuid = super.casterThing.FindActorEffect("ef_disc_truesight");
- if (effectGuid != 0) {
- super.casterThing.ExpandActorEffect(effectGuid, Discipline.TRUESIGHT_DURATIONS[level], false);
- ((Discipline)this).DisplayRecast("TrueSight", level);
- } else {
- super.casterThing.AddActorEffectByLevel("ef_disc_truesight", Discipline.TRUESIGHT_DURATIONS[level], level, casterGuid, 4);
- ((Discipline)this).DisplayCast("TrueSight", level);
- }
-
- return 1;
- } catch (Exception var5) {
- CodexConsole.PrintException(((Throwable)var5).getMessage() + " in " + "TrueSight" + " [cast]");
- return 0;
- } catch (Error var6) {
- CodexConsole.PrintError(((Throwable)var6).getMessage() + " in " + "TrueSight" + " [cast]");
- return 0;
- }
- }
- }
- }
-